import { http } from "@/utils/http";

export const getListAgentDept = (params?) => {
  return http.request(
    "get",
    "/api/business/user_data_permissions/listAgentDept",
    { params }
  );
};

export const getListAgent = (params?) => {
  return http.request("get", "/api/business/merchants_info/listAgent", {
    params
  });
};

export const getInfoAgen = id => {
  return http.request("get", "/api/business/merchants_info/getInfo/" + id);
};

export const getListTaxSourcesRole = (params?) => {
  return http.request(
    "get",
    "/api/business/user_data_permissions/listTaxSourcesRole",
    { params }
  );
};

export const getLnvoiceOrderState = (params?) => {
  return http.request(
    "get",
    "/api/constantList/invoiceOrderState",
    { params }
  );
};

export const getLnvoiceOrderList = (params?) => {
  return http.request(
    "get",
    "/api/business/invoice_order/listAgent",
    { params }
  );
};

export const getListMerchantName = (params?) => {
  return http.request(
    "get",
    "/api/business/user_data_permissions/listMerchantName",
    { params }
  );
};

export const getListDtlAgente = (params?) => {
  return http.request(
    "get",
    "/api/business/commission_settlement/listDtlAgent",
    { params }
  );
};

export const getInfoDetails = (id) => {
  return http.request(
    "get",
    "/api/business/invoice_order/getInfo/" + id,
  );
};

export const getListByAgent = (params?) => {
  return http.request(
    "get",
    "/api/business/merchants_account/listByAgent",
    { params }
  );
};

export const getListFlowDetails = (params?) => {
  return http.request(
    "get",
    "/api/business/finance_flow_merchants/listByAgent",
    { params }
  );
};

export const getFlowMerchantsFlowType = (params?) => {
  return http.request(
    "get",
    "/api/constantList/flowMerchantsFlowType",
    { params }
  );
};

export const getReleaseRecords = (params?) => {
  return http.request(
    "get",
    "/api/business/lg_salary_payment_schedule_commission/listByAgent",
    { params }
  );
};

export const exportListByAgent = (params, axiosConfig: any) => {
  return http.request(
    "get",
    "/api/business/salary_payment_schedule/exportListByAgent",
    { params }, axiosConfig
  );
};

export const getReleaseDetail = (params?) => {
  return http.request(
    "get",
    "/api/business/salary_payment_dtl/listAgent",
    { params }
  );
};

export const getSalaryDtlState = (params?) => {
  return http.request(
    "get",
    "/api/constantList/salaryDtlState",
    { params }
  );
};